package Message.Public
{
    import Engine.RMI.*;
    import Framework.Serialize.*;

    public class EVIPType extends Object
    {
        public var __value:int;
        private static var __values:Array = [];
        public static const _EVIPTypeNormal:int = 0;
        public static const EVIPTypeNormal:EVIPType = new EVIPType(_EVIPTypeNormal);
        public static const _EVIPTypeWeek:int = 3;
        public static const EVIPTypeWeek:EVIPType = new EVIPType(_EVIPTypeWeek);
        public static const _EVIPTypeMonth:int = 6;
        public static const EVIPTypeMonth:EVIPType = new EVIPType(_EVIPTypeMonth);
        public static const _EVIPTypeHalfYear:int = 9;
        public static const EVIPTypeHalfYear:EVIPType = new EVIPType(_EVIPTypeHalfYear);

        public function EVIPType(param1:int)
        {
            this.__value = param1;
            __values[param1] = this;
            
        }

        public function value() : int
        {
            return this.__value;
        }

        public function equals(param1:Object) : Boolean
        {
            if (param1 == this)
            {
                return true;
            }
            var _loc_2:* = param1 as ERMICallModel;
            if (_loc_2 == null)
            {
                return false;
            }
            return this.__value == _loc_2.value();
        }

        public function hashCode() : int
        {
            return 5 * this.__value;
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeByte(this.__value);
            
        }

        public static function convert(param1:int) : EVIPType
        {
            return __values[param1];
        }

        public static function __read(param1:SerializeStream) : EVIPType
        {
            var _loc_2:* = param1.readByte();
            if (_loc_2 < 0 || _loc_2 >= 10)
            {
                throw new MarshalException();
            }
            return EVIPType.convert(_loc_2);
        }

    }
}
